# #以读方式打开
# f = open('./test.txt','r')
# #以写方式打开
# f = open('./test.txt','w')
# #以追加写方式打开
# f = open('./test.txt','a')

# count = 0
# List=[]
# while True:
#     count+=1
#     f=open('./test.txt','r')
#     List.append(f)
#     print(f'count={count}')


# f = open('./test.txt','r')
#
# f.close()


# f = open('./test.txt','w')
# f.write('你是笨蛋')
# f.close()


# f = open('./test.txt','r',encoding='utf-8')
# str = f.read(10)
# print(str)
# f.close()


# f = open('./test.txt','r',encoding='utf-8')
# for line in f:
#     print(f'line:{line}',end='')
# f.close()


with open('./test.txt','r',encoding='utf-8') as f:
    f.read(10)



